Calculate node

Calculate node is used to calculate values for variables. For example, you may increase specific variable’s value or store a sum of two existing variables in a new variable.

When using assignment operator, specify variable values “as is” – and do not enclose them in curly brackets. For example:

total_participants = adults_num + children_num

On the right-hand side of the assignment you may use arithmetic operators, functions and the rest of the expression syntax. For the complete reference, see Expression syntax.

You may also assign a random value using a generator function – random_digits(count), random_int(low, high) or uuid(). A new value is generated each time the node runs, for example a new PIN on every retry:

pin = random_digits(4)

Transitions

Calculate node has a single “continue” transition. Connect it to logical conditions node if you want to branch the flow based on the calculated variables data.

Calculate node settings

Global node – Enables transition to this node from any other node in the conversation flow.